const pxtorem = require('postcss-pxtorem')
module.exports = {
    lintOnSave: false,
    publicPath: './',
    filenameHashing: false,
    // 前端解决跨域请求
    devServer: {
        proxy: {
            '/api' :{
                target: 'http://kumanxuan1.f3322.net:8001',
                changeOrigin: true,
                pathRewrite: {
                    '^/api': '/'
                }
            }
        },
        headers:{
          'Access-Control-Allow-Origin':'*'
        },
       // host: '0.0.0.0',
        hotOnly: false,
        disableHostCheck: true
    },
    css: {
        loaderOptions: {
            postcss: {
                plugins: [
                    pxtorem({
                        rootValue: 37.5,
                        propList: ['*'],
                        // 该项仅在使用 Circle 组件时需要
                        // 原因参见 https://github.com/youzan/vant/issues/1948
                        selectorBlackList: ['van-circle__layer']
                    })
                ]
            }
        }
    }
}